package com.qiuzhi.custom;

import com.qiuzhi.service.IUserService;
import com.qiuzhi.spring.QiuzhiApplicationContext;

public class Main {

    public static void main(String[] args) {
        QiuzhiApplicationContext context = new QiuzhiApplicationContext(AppConfig.class);

        IUserService userService1 = (IUserService) context.getBean("userService");
        userService1.show();

        IUserService userService2 = (IUserService) context.getBean("userService");
        userService2.show();

//        Object userService2 = context.getBean("userService");
//        System.out.println(userService2);
//        Object userService3 = context.getBean("userService");
//        System.out.println(userService3);

//        OrderService orderService= (OrderService)context.getBean("orderService");
//        orderService.test();
//        System.out.println(orderService1);
//
//
//        Object orderService2 = context.getBean("orderService");
//        System.out.println(orderService2);
//        OrderService orderService = (OrderService) context.getBean("orderService");
//        orderService.test();
//        UserService userService = (UserService) context.getBean("userService");
//        userService.test();


    }
}
